diff --git a/common/cmd_ubi.c b/common/cmd_ubi.c
index bbca389..05893f5 100644
--- a/common/cmd_ubi.c
+++ b/common/cmd_ubi.c
@@ -395,11 +395,13 @@
 	return err ? err : count_save - size;
 }
 
-static int ubi_dev_scan(struct mtd_info *info, char *ubidev)
+static int ubi_dev_scan(struct mtd_info *info, char *ubidev,
+		const char *vid_header_offset)
 {
 	struct mtd_device *dev;
 	struct part_info *part;
 	struct mtd_partition mtd_part;
+	char ubi_mtd_param_buffer[80];
 	u8 pnum;
 	int err;
 
@@ -413,7 +415,11 @@
 	mtd_part.offset = part->offset;
 	add_mtd_partitions(info, &mtd_part, 1);
 
-	err = ubi_mtd_param_parse(buffer, NULL);
+	strcpy(ubi_mtd_param_buffer, buffer);
+	if (vid_header_offset)
+		sprintf(ubi_mtd_param_buffer, "mtd=%d,%s", pnum,
+				vid_header_offset);
+	err = ubi_mtd_param_parse(ubi_mtd_param_buffer, NULL);
 	if (err) {
 		del_mtd_partitions(info);
 		return err;
@@ -450,6 +456,7 @@
 		char mtd_dev[16];
 		struct mtd_device *dev;
 		struct part_info *part;
+		const char *vid_header_offset = NULL;
 		u8 pnum;
 
 		/* Print current partition */
@@ -497,8 +504,11 @@
 
 		ubi_dev.selected = 1;
 
+		if (argc > 3)
+			vid_header_offset = argv[3];
 		strcpy(ubi_dev.part_name, argv[2]);
-		err = ubi_dev_scan(ubi_dev.mtd_info, ubi_dev.part_name);
+		err = ubi_dev_scan(ubi_dev.mtd_info, ubi_dev.part_name,
+				vid_header_offset);
 		if (err) {
 			printf("UBI init error %d\n", err);
 			ubi_dev.selected = 0;
@@ -594,8 +604,9 @@
 
 U_BOOT_CMD(ubi, 6, 1, do_ubi,
 	"ubi commands",
-	"part [part]"
-		" - Show or set current partition\n"
+	"part [part] [offset]\n"
+		" - Show or set current partition (with optional VID"
+		" header offset)\n"
 	"ubi info [l[ayout]]"
 		" - Display volume and ubi layout information\n"
 	"ubi create[vol] volume [size] [type]"
diff --git a/common/cmd_ubifs.c b/common/cmd_ubifs.c
index d9f60d5..ed0e9db 100644
--- a/common/cmd_ubifs.c
+++ b/common/cmd_ubifs.c
@@ -47,6 +47,10 @@
 	char *vol_name;
 	int ret;
 
+	if (argc != 2) {
+		cmd_usage(cmdtp);
+		return 1;
+	}
 	vol_name = argv[1];
 	debug("Using volume %s\n", vol_name);
 
@@ -88,6 +92,7 @@
 int do_ubifs_load(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 {
 	char *filename;
+	char *endp;
 	int ret;
 	u32 addr;
 	u32 size = 0;
@@ -98,15 +103,25 @@
 	}
 
 	if (argc < 3) {
-		printf("Usage:\n%s\n", cmdtp->usage);
+		cmd_usage(cmdtp);
 		return -1;
 	}
 
-	addr = simple_strtoul(argv[1], NULL, 16);
+	addr = simple_strtoul(argv[1], &endp, 16);
+	if (endp == argv[1]) {
+		cmd_usage(cmdtp);
+		return 1;
+	}
+
 	filename = argv[2];
 
-	if (argc == 4)
-		size = simple_strtoul(argv[3], NULL, 16);
+	if (argc == 4) {
+		size = simple_strtoul(argv[3], &endp, 16);
+		if (endp == argv[3]) {
+			cmd_usage(cmdtp);
+			return 1;
+		}
+	}
 	debug("Loading file '%s' to address 0x%08x (size %d)\n", filename, addr, size);
 
 	ret = ubifs_load(filename, addr, size);
@@ -119,7 +134,8 @@
 U_BOOT_CMD(
 	ubifsmount, 2, 0, do_ubifs_mount,
 	"mount UBIFS volume",
-	""
+	"<volume-name>\n"
+	"    - mount 'volume-name' volume"
 );
 
 U_BOOT_CMD(ubifsls, 2, 0, do_ubifs_ls,
